package com.example.mybatis_plus_demo.controller;

import com.example.mybatis_plus_demo.mapper.UserMapper;
import com.example.mybatis_plus_demo.model.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: fzykd
 * Date: 2022-12-19
 * Time: 20:56
 */

@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserMapper userMapper;

    @RequestMapping("/list")
    public List<UserInfo> selectList(){
        List<UserInfo> list = userMapper.selectList(null);
        return list;
    }
}
